package com.vanzo.some.appinfo;

import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageItemInfo;
import android.content.pm.PackageManager;

import java.util.List;

/**
 * Created by tisen on 2017/10/26.
 */

public class AppHandle {

    public List<AppInfo> getInfo(Context context) {
        PackageManager packageManager = context.getPackageManager();
        List<PackageInfo> packageInfos = packageManager.getInstalledPackages(0);
        System.out.println("packageInfos size = " + packageInfos.size() + "");
        for (PackageInfo packageInfo : packageInfos) {
            System.out.println(packageInfo.packageName);
        }

        return null;
    }
}
